How to use the Random Card Switcher

04-07-2010 WyldAnimal
www.deskbabes.net
www.lvnd.com

Credit is given to Alerte and Starryk
With permission I used the basic design of Alerte's and Starryk's Script files.
Some modifications were made for use by the Card Switcher program.


First you Must have the Correct Folder structure set up:

Make a master Folder to hold all of your Card Sets
Then in this folder you will have SubFolders that contain the Actual Card Sets.
In each Subfolder is a 2nd Subfolder named 'Data'
In the Data Folder are all of individual Card Folders with the Card images.

Example:

C:\My Card Sets
______________|_NewSet1
______________|_______|_Data
______________|____________|_a0001
______________|__________________|_a0001c.jpg
______________|____________|_a0032
______________|__________________|_a0032c.jpg

______________|_NewSet2
______________|_______|_Data
______________|____________|_a0001
______________|__________________|_a0001c.jpg
______________|____________|_a0032
______________|__________________|_a0032c.jpg

______________|_makebackup <-- special empty folder name that you make. *See below for use.

______________|_help <-- special empty folder name that you make. *See below for use.

______________|_showcards <-- special empty folder name that you make. *See below for use.

Copy the Card_Switcher.EXE file from the Zip to the Master Folder where all of your card sets are saved.


In the Example you would copy the Card_Switcher.EXE file to this folder. 
C:\My Card Sets

Now Each time you Double click on the Card_Switcher.exe file, it will pick out at Random
One of the Card Set SubFolders, and Copy the Data Folder to your VGHD Data Folder.

****************************************
***********  NEW FUNCTION  *************
****************************************

Drag and Drop mode:

Drag a Folder name from the Master folder and Drop it on to the Card_Switcher.exe Icon.
This will force the Card Switcher to Copy that Set of Cards.

****************************************
***********  NEW FUNCTION  *************
****************************************

Special Folder name: makebackup
Create an Empty Folder called 'makebackup' without the ' marks

If you drag and drop the makebackup folder on to the Card_Switcher.exe Icon,  it will run the SaveOrig.bat routine
and make a backup of all of the VGHD cards and save them to the saveorig folder.

If that folder already exists, it will be overwritten.
So make sure that is what you wanted to do.

While the Backup is being made, the computer will see a high CPU use. It will drop back to normal when it is done.
The Script window will run minimized on the task bar. you can open it to watch it make the backup.
It will close when finished.

*************************************
*************************************
Caution: DO NOT CLOSE it on your Own.
if you do,  find the Data folder in the saveorig folder.
then Find the file exclude.txt and delete it.
the Card_Switcher.exe program will run forever till that file is deleted.
*************************************
*************************************


*******************************************
**************  NEW FUNCTION  *************
*******************************************

Special Folder name: help
Create an Empty Folder called 'help' without the ' marks

If you drag and drop the help folder on to the Card_Switcher.exe Icon,  it will write out this help File so you can read it again.

*******************************************
**************  NEW FUNCTION  *************
*******************************************

Special Folder name: showcards
Create an Empty Folder called 'showcards' without the ' marks

If you drag and drop the showcards folder on to the Card_Switcher.exe Icon,  
It will open a window and display all of the card images for the current set of cards that are installed.
Note:
This window is a Richtext View, so you can Drag and Drop an Image from the CardView into your favorite Image
editing program. or you can do a copy and paste. ( click on a card image, CTRL-V,  in your Image Edit program paste. )


****************************************
***********  USAGE IDEAS   *************
****************************************

Advance Use 1:
Pick out a random Card set Each time Windows Starts up.

Right Click on the Card_Switcher.exe file and make a Shortcut to it.
Copy the Short Cut and Save it in the All Programs Startup folder.


Advance use 2:
Create a new Scheduled Task in Control Panel, and Run the Card_Switcher.exe at a Set time period.
This way you can use the Task Scheduler to change card sets every 10 minutes..

*****************************************
***********  WINDOWS VISTA  *************
*****************************************


*****************************************
***********    WINDOWS 7    *************
*****************************************

Program was written and designed in Windows XP Pro
For it to work with Windows Vista or Windows 7

You may need to create a shortcut, and then set Advanced properties with un in XP Compatibility mode
You may also need to run as Adminisrator.



*****************************************
***********  SCRIPT SOURCE  *************
*****************************************

Script Source code:
These scripts are embeded into the Card Switcher.
They are written out to the master folder and used as needed.

Script to Find the VGHD Data folder path:
<<<<  Begin Here >>>>

@echo off

:: 04-07-2010 by WyldAnimal
:: www.deskbabes.net
:: www.lvnd.com

:: using the basic design from Alerte and Starryk
:: modify the Get VGHD Data folder from Registry portion
:: to work as a slave for the Card Switcher Program

set xx=3
:loop1
set tempdata=/// 
:::::::::::::::::::::::::::::::::::::::
::       Find VGHD Data Path         ::
:::::::::::::::::::::::::::::::::::::::
for /f "Tokens=%xx%""delims=" %%a in ('REG QUERY HKEY_CURRENT_USER\SOFTWARE\Totem\vghd\System ^| FINDSTR "DataPath"') do set tempdata="%%a"
if %tempdata%==/// goto foundpath1
set tempdata=%tempdata:"=%
set vghddata=%vghddata% %tempdata%
set /a xx=%xx%+1
goto loop1
:foundpath1
set vghddata=%vghddata:~1,100%
echo %vghddata% >%1vghddatapath.txt
echo %vghddata% 

<<<< End Here >>>>

Script to make backup of VGHD cards:
<<<< Begin Here >>>>

@echo off

cls

TITLE SAVE VGHD card set by Alerte and Starryk and WyldAnimal

:: 04-07-2010 by WyldAnimal
:: www.deskbabes.net
:: www.lvnd.com

:: using the basic design from Alerte and Starryk
:: modify the copy portion of the bat file to work
:: as a slave for the Card Switcher Program

::::::::::::::::::::::::::::::::::::::::::::::::::
:: get default path sent Card Switcher Program 
:: if path is missing run in current folder 
:: else change to the path 
::::::::::::::::::::::::::::::::::::::::::::::::::
If %1"" == "" goto save
set basepath=%1
:: Change to the right drive letter
Echo %basepath:~1,2%
%basepath:~1,2%
:: Change to the right folder
cd %basepath%
Echo %basepath%
:: Pause
goto save

:makesaveorig
md saveorig
goto origexist

:makesdata
md data
goto sdataexist
:save
::::::::::::::::::::::::::::::::::::::::::::::::::
:: Create a folder saveorig and a subfolder data and copy
:: all files that are not listed in exclude.txt to this new 
:: subfolder
::::::::::::::::::::::::::::::::::::::::::::::::::::::

IF not EXIST %saveorig goto makesaveorig
:origexist
cd saveorig
IF not EXIST %data goto makesdata
:sdataexist
cd data
:::::::::::::::::::::::::::::::::::::::::::::::::::::
::: create the exclude textfile
:::::::::::::::::::::::::::::::::::::::::::::::::::::
echo music > exclude.txt
echo skins >> exclude.txt
echo backgrounds >> exclude.txt
echo playlists >> exclude.txt
echo .bmp >> exclude.txt
echo .psd >> exclude.txt
echo .vhd >> exclude.txt
echo .txt >> exclude.txt
echo .cld >> exclude.txt
echo .lst >> exclude.txt
echo .log >> exclude.txt
echo .vghd >> exclude.txt
echo .cds >> exclude.txt
echo .dat >> exclude.txt
echo .rar >> exclude.txt
echo .zip >> exclude.txt
echo .ace >> exclude.txt
echo .7z >> exclude.txt

for /f "tokens=*" %%a in ('cd') do set savefolder=%%a
set zz=3
:boucle1
set testdata=/// 
:::::::::::::::::::::::::::::::::::::::
:: for get where is your folder data ::
:::::::::::::::::::::::::::::::::::::::
for /f "Tokens=%zz%""delims=" %%a in ('REG QUERY HKEY_CURRENT_USER\SOFTWARE\Totem\vghd\System ^| FINDSTR "DataPath"') do set testdata="%%a"
if %testdata%==/// goto findata1
set testdata=%testdata:"=%
set data=%data% %testdata%
set /a zz=%zz%+1
goto boucle1
:findata1
set data=%data:~1,100%
set data=%data:~0,-1%
echo %data%
echo %savefolder%
:: Pause
xCOPY /s /y "%data%" "%savefolder%" /EXCLUDE:exclude.txt
del exclude.txt

<<<< End Here >>>>



